

<html>
<head><title>PHP TEST</title></head>
<body>
採点：
<input type="text" name="email" size="20">
<input name="data">
<input type="submit" value="送信"/>
<?php

$dsn = 'mysql:dbname=orb;host=localhost';
$user = 'root';
$password = '';

try{
    $dbh = new PDO($dsn, $user, $password);


    $sql = 'select * from Accounts';
    $Users = $dbh->query($sql);
    foreach ($Users as $row) {
        print($row['filename']);
        print($row['noteid'].'<br>');
        　print "入力された点数は［";
	　print $_POST["data"]; 　　
	　print "］です。<br>";
   }
}catch (PDOException $e){
    print('Connection failed:'.$e->getMessage());
    die();
}

c?>
</body>

